﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FinalTestMachine.Motion
{
    internal class CardInital
    {
        //public static event Action<string> ReportInfoProcessBarEvent;
        //public static CardInitialClosedll.CardInitialCloseHelper card = new ZMotionHelper.ZMotionCard(
        //    Handler.Properties.Settings.Default.ZMotion_IP);
        //private static void Card_ReportCardInitializeProcess(string msg)
        //{
        //    ReportInfoProcessBarEvent?.Invoke(msg);
        //}
        static CardInital()
        {
            AM.Global.GlobalCfg.G_CardType = AM.Global.GlobalCfg.CardType.ZMotion;
        }

        public static event Action<string> ReportInfoProcessBarEvent;

        private static void Card_ReportCardInitializeProcess(string msg)
        {
            ReportInfoProcessBarEvent?.Invoke(msg);
        }

        public static void Initial()
        {
            App.card.ReportCardInitializeProcess += Card_ReportCardInitializeProcess;
            App.card.Initial();
        }

        public static void Close()
        {
            App.card.Close();
        }
    }
}